pub mod list_t {
    use yew::{prelude::*, html::ChildrenRenderer, virtual_dom::VChild};
    
    pub struct P1;
    pub struct P2;

    // Component P1
    impl Component for P1 {
        type Message = ();

        type Properties = ();

        fn create(_ctx: &Context<Self>) -> Self {
            Self
        }

        fn view(&self, _ctx: &Context<Self>) -> Html {
            html! {
                <p>{"p1"}</p>
            }
        }
    }

    // Component P2
    impl Component for P2 {
        type Message = ();

        type Properties = ();

        fn create(_ctx: &Context<Self>) -> Self {
            Self
        }

        fn view(&self, _ctx: &Context<Self>) -> Html {
            html! {
                <p>{"p2"}</p>
            }
        }
    }

    #[derive(Clone, PartialEq, derive_more::From)]
    pub enum ItemEnum {
        // virtual children Component
        P1(VChild<P1>),
        P2(VChild<P2>),
    }

    #[allow(clippy::from_over_into)]
    impl Into<Html> for ItemEnum {
        fn into(self) -> Html {
            match self {
                Self::P1(child) => child.into(),
                Self::P2(child) => child.into(),
            }
        }
    }


    #[derive(Properties, PartialEq)]
    pub struct ListProps {
        #[prop_or_default]
        // type of enum are available
        pub children: ChildrenRenderer<ItemEnum>,
        // all type ok
        // pub children: Children,
        // only Item type ok
        // pub children: ChildrenWithProps<Item>,
    }

    pub struct Item;

    // Item Component show a  li- item
    impl Component for Item {
        type Message = ();

        type Properties = ();

        fn create(_ctx: &Context<Self>) -> Self {
            Self
        }

        fn view(&self, _ctx: &Context<Self>) -> Html {
            html!{
                <li>{"item"}</li>
            }
        }
    }


    pub struct List;

    // List Show Component
    impl Component for List {
        type Message = ();

        // Props is the Props(ListProps)
        type Properties = ListProps;

        fn create(_ctx: &Context<Self>) -> Self {
            Self
        }

        fn view(&self, ctx: &Context<Self>) -> Html {
            html!{
                <div class="list">
                    <lu>
                        // use as rust iterator to show elements
                        {for ctx.props().children.iter() }
                    </lu>
                </div>
            }
        }
    }
}